import { createRouter, createWebHashHistory } from 'vue-router'
import login from '../views/login.vue'
import workerMainPage from '../views/worker/workerMainPage.vue'
import specialistMainPage from  '../views/specialist/specialistMainPage.vue'
import workerFirstPage from '../views/worker/workerFirstPage.vue'
import workerEventPage from '../views/worker/workerEventPage.vue'
import workerSelfPage from '../views/worker/workerSelfPage.vue'
import workerCityPage from '../views/worker/workerCityPage.vue'
import workerMaterialPage from '../views/worker/workerMaterialPage.vue'
import workerProcedurePage from '../views/worker/workerProcedurePage.vue'
import workerReportPage from '../views/worker/workerReportPage.vue'
import workerEnterprisePage from '../views/worker/workerEnterprisePage.vue'
import specialistSelfPage from '../views/specialist/specialistSelfPage.vue'
import report from '../views/specialist/report.vue'
import specialistHistory from '../views/specialist/specialistHistory.vue'

const routes = [ 
  {
    path: '/',
    name: 'home',
    component: login
  },
  {
    path:'/workerMainPage',
    name:'workerMainpage',
    component:workerMainPage,
    children:[
      {
      path:'/workerMainPage/workerFirstPage',
      name:workerFirstPage,
      component:workerFirstPage
    },{
      path:'/workerMainPage/workerEventPage',
      name:'workerEventPage',
      component:workerEventPage
    },{
      path:'/workerMainPage/workerSelfPage',
      name:'workerSelfPage',
      component:workerSelfPage
    },{
      path:'/workerMainPage/workerCityPage',
      name:'workerCityPage',
      component:workerCityPage 

    },{
      path:'/workerMainPage/workerMaterialPage',
      name:'workerMaterialPage ',
      component:workerMaterialPage 

    },{
      path:'/workerMainPage/workerProcedurePage',
      name:'workerProcedurePage ',
      component:workerProcedurePage 

    },{
      path:'/workerMainPage/workerReportPage',
      name:'workerReportPage ',
      component:workerReportPage 

    },{
      path:'/workerMainPage/workerEnterprisePage',
      name:'workerEnterprisePage ',
      component:workerEnterprisePage 
    }]
  },
  {
    path:'/specialistMainPage',
    name:'specialistMainPage',
    component:specialistMainPage,
    children: [
      {
        path: '/specialistMainPage/report',
        name: 'report',
        component: report
      },
      {
        path: '/specialistMainPage/specialistSelfPage',
        name: 'specialistSelfPage',
        component: specialistSelfPage
      },{
        path:'/specialistMainPage/specialistHistory',
        name:'specialistHistory',
        component:specialistHistory
      }
    ]

  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
